package com.letoken.platform.repo.app.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * app用户session表
 * </p>
 *
 * @author 作者
 * @since 2022-11-15
 */
@Getter
@Setter
@TableName("app_user_session")
@ApiModel(value = "AppUserSession对象", description = "app用户session表")
public class AppUserSession extends Model<AppUserSession> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
      @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Integer id;

    @ApiModelProperty("设备ID")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty("设备源。IOS/ANDROID")
    @TableField("device_res")
    private String deviceRes;

    @ApiModelProperty("设备类型")
    @TableField("device_model")
    private String deviceModel;

    @ApiModelProperty("设备型号")
    @TableField("device_platforms")
    private String devicePlatforms;

    @ApiModelProperty("状态（0不在线，1在线）")
    @TableField("active")
    private Integer active;

    @ApiModelProperty("登录IP")
    @TableField("login_ip")
    private String loginIp;

    @ApiModelProperty("token")
    @TableField("token")
    private String token;

    @ApiModelProperty("设备token")
    @TableField("device_token")
    private String deviceToken;

    @ApiModelProperty("语言（简体中文：ZH，繁体中文：ZHT，英文：EN）")
    @TableField("lang")
    private String lang;

    @ApiModelProperty("客户端版本")
    @TableField("version")
    private String version;

    @ApiModelProperty("计数")
    @TableField("loginidx")
    private Integer loginidx;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
